﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using TVShows_EF5.Models;

namespace TVShows_EF5.Controllers
{
    public class WebApiController : ApiController
    {
        private TVShowsContext db = new TVShowsContext();

        // GET api/webapi
        [HttpGet]
        public IEnumerable ObtenerEpisodios(long id)
        {
            TVShow tvshow = db.TVShows.Find(id);
            return tvshow.episodios;
        }

    }
}
